package com.fs.common.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ACE
 * @desc 角色菜单实体类
 * @creationTime 2019-03-30 15:00
 * @projectName weixinframe
 * @packageName com.fs.pojo
 */
@Data
@TableName("s_role_right")
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
public class RoleRight extends IdEntity {
	private String roleId;
	private String menuMotionId;
	
	public static List<RoleRight> formatData(String roleId,String[] menuMotion){
		List<RoleRight> list = new ArrayList<RoleRight>();
		for(String menuMotionId: menuMotion){
			list.add(new RoleRight(roleId,menuMotionId));
		}
		return list;
	}

}
